<template>
  <div class="nav">
    <div class="nav_box">
      <div class="logo_box">
        <a>
          <!-- <img src="../assets/guologo.png" alt="" class="logo" /> -->
          <!-- <img src="../assets/logo1.jpg" alt="" class="logo" /> -->
        </a>
      </div>
      <div class="nav_right">
        <!-- <div class="log_reg">
          <span>
            <a id="login" style="color: white; cursor: pointer" @click="close"
              >退出登录</a
            >
          </span>
        </div> -->
        <ul class="nav_list">
          <li class="nav_li" menuorder="2">
            <a
              :class="{
                nav_list_li_b: $route.path == '/routeArticle',

                nav_list_li_a: true,
              }"
              @click="gotopage('routeArticle')"
              >任务中心</a
            >
          </li>
          <li class="nav_li" menuorder="2">
            <a
              :class="{
                nav_list_li_b: $route.path == '/Integrating',
                nav_list_li_a: true,
              }"
              @click="gotopage('Integrating')"
              >合成平台</a
            >
          </li>
        </ul>
        <div></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      currentRouter: "article",
    };
  },
  methods: {
    gotopage(selectRouter) {
      switch (selectRouter) {
        case "routeArticle":
          if (this.$route.name != "article") {
            this.currentRouter = selectRouter;
            let routeData = this.$router.resolve({ path: "/routeArticle" });
            window.open(routeData.href, "_self");
          }

          break;

        case "Integrating":
          if (this.$route.name != "Integrating") {
            this.currentRouter = selectRouter;
            let routeData = this.$router.resolve({ path: "/Integrating" });
            window.open(routeData.href, "_self");
          }
          break;
      }
    },
    close() {
      localStorage.removeItem("autu");
      this.$router.push("/login3d");
    },
  },
};
</script>

<style scoped>
.nav {
  background-image: url(../assets/nav_bg1.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  height: 100%;
  width: 100%;
}
@media all and (max-width: 500px) {
  .nav {
    position: relative;
    background-image: url(../assets/nav_bg1.png);
    width: 1200px;
    height: 140px;
  }
}
.selected {
  color: #409eff;
}
.nav_box {
  position: relative;
  width: 100%;
  height: 250px;
  margin: 0 auto;
  padding: 0px 10px 0px 10px;
  vertical-align: bottom;
}
@media screen and (max-width: 1300px) {
  .nav_box {
    position: relative;
    width: 1200px;
    height: 140px;
  }
}
.nav_left {
  float: left;
  width: 100px;
}
.logo_box {
  height: 94px;
  float: left;
  position: absolute;
  left: 20px;
}
.logo {
  float: left;
  cursor: pointer;
  margin-top: -40px;
  margin-left: -65px;
  border: none;
  height: 185px;
  width: 100%;
  width: 400px;
}
.nav_right {
  height: 94px;

  position: absolute;
  left: 260px;
  bottom: 0px;
}
@media screen and (max-width: 1300px) {
  .nav_right {
    height: 94px;

    position: absolute;
    left: 85px;
    bottom: -10px;
  }
}
.log_reg {
  margin-top: 15px;
  float: right;
  font-size: 14px;
  font-family: "microsoft yahei";
  color: #333333;
  position: absolute;
  right: 20px;
}
.nav_list {
  cursor: pointer;
  line-height: 30px;
  margin-top: 50px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  width: 900px;

  /* background: red; */
}
.nav_list li {
  list-style: none;
  float: left;
  font-size: 14px;
  color: white;
  margin-left: 22px;
  position: relative;
  list-style: none;
}

.nav_list_li_a {
  text-decoration: none;
  color: white;
  padding: 4px;
  font-size: 14px;
}
.nav_list_li_a:hover {
  text-decoration: none;
  color: white;

  padding: 4px;
  border-bottom: solid 2px;
}
.nav_list_li_b {
  text-decoration: none;
  color: white;
  font-size: 14px;
  padding: 4px;
  border-bottom: solid 2px;
}
</style>